package com.zhiyizhen.handheld.component.workspace.bean;

import com.zhiyizhen.handheld.common.base.BaseBean;

import java.util.List;

public class MySchedule extends BaseBean {

    private String scheduleId;
    private String workDate;

    private List<DetailListItem> detailList;

    public String getWorkDate() {
        return workDate;
    }

    public List<DetailListItem> getDetailList() {
        return detailList;
    }

    public String getTime() {
        if (getDetailList() == null || getDetailList().isEmpty()) {
            return "";
        }
        StringBuilder timeSb = new StringBuilder();
        for (int i = 0; i < getDetailList().size(); i++) {
            timeSb.append(getDetailList().get(i).getStartTime()).append("~").append(getDetailList().get(i).getEndTime());
            if (i != getDetailList().size() - 1) {
                timeSb.append("，");
            }
        }
        return timeSb.toString();
    }
}
